package net.jiastudy.biz.sys.service;

import java.util.List;
import java.util.Map;
import java.util.Set;

import net.jiastudy.biz.datasync.DeptImporter;
import org.springframework.data.domain.Sort;

import com.baomidou.mybatisplus.plugins.Page;

import net.jiastudy.biz.enums.DeptType;
import net.jiastudy.biz.sys.entity.Dept;

public interface DeptService {

	public Dept createDept(Dept dept);

	public boolean deleteDept(Long id);

	public Dept getDeptByCode(String code);

	public Dept updateDept(Dept dept);

	public Dept getDept(Long id);

	public Page<Dept> pageDepts(Page<Dept> page, DeptType type, Map<String, String> conditions, Sort sort);

	public List<Dept> findEnableDepts();

	public List<Dept> findEnableDepts(DeptType type);

	public boolean disableDept(Long id);

	public boolean enableDept(Long id);

	public boolean checkCodeExists(String code, Long id);

	public List<Dept> findDeptsByIds(Set<Long> ids);

	public Dept getDeptByName(String name);

	public List<Dept> findAllDepts();

	public void importDepts(List<DeptImporter> list);
}
